unit UnBeheerders;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Mask, DBCtrls, Grids, DBGrids, DB, ExtCtrls,UnDataModule;

type
  TBeheerders = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Button1: TButton;
    DsStamgegevens: TDataSource;
    DBNavigator1: TDBNavigator;
    DBGrid1: TDBGrid;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Panel3: TPanel;
    DBLookupComboBox1: TDBLookupComboBox;
    Label8: TLabel;
    DsGebruikers: TDataSource;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button1Click(Sender: TObject);
  private
    aDmDataSets : TDmDataSets;
  public
    property DmDataSets : TDmDataSets read aDmDataSets write aDmDataSets;
  end;

var
  Beheerders: TBeheerders;

implementation

{$R *.dfm}

procedure TBeheerders.Button1Click(Sender: TObject);
begin
  close;
end;

procedure TBeheerders.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  if DsStamgegevens.DataSet.State in [dsEdit,dsInsert] then
  begin
    if MessageDlg('Wijzigingen opslaan?',mtConfirmation,mbYesNo,0) = mrOk then
    begin
      DsStamgegevens.DataSet.Post;
      DsStamgegevens.DataSet.Refresh;
    end;
  end;
  Action := caFree;
end;


end.
